const { createProxyMiddleware } = require('http-proxy-middleware');
const Mock = require('mockjs')

module.exports = function (app) {
    app.get("/api/example", function (req, res) {
        let data = {
            message:"for example"
        }
        return res.json(data)
    })
    app.use(createProxyMiddleware('/api', { target: 'http://localhost:5000/' }));
};